<template>
	<view class="recordDetails">
		<view class="cartType">
			<view class="cartType_item">
				<view>
					<em style="display: inline-block ;color: #f00;">*</em>
					申请人：
					<view style="color: #9E2424FF;display: inline-block;vertical-align:middle;">
						{{applicant}}
					</view>
				</view>
			</view>
			<view v-show="!istra">
				<view class="cartType_item">
					<view>
						<em style="display: inline-block ;color: #f00;">*</em>
						出货仓库：
						<view style="color: #9E2424FF;display: inline-block;vertical-align:middle;">
							{{outhouse}}
						</view>
					</view>
				</view>
				<view class="cartType_item">
					<view>
						<em style="display: inline-block ;color: #f00;">*</em>
						客户姓名：
						<view style="color: #9E2424FF;display: inline-block;vertical-align:middle;">
							{{user_name}}
						</view>
					</view>
				</view>
				<view class="cartType_item">
					<view>
						<em style="display: inline-block ;color: #f00;">*</em>
						客户电话：
						<view style="color: #9E2424FF;display: inline-block;vertical-align:middle;">
							{{user_phone}}
						</view>
					</view>
				</view>
				<view class="cartType_item">
					<view>
						<em style="display: inline-block ;color: #f00;">*</em>
						详细地址：
						<view style="color: #9E2424FF;">{{user_local}}</view>
					</view>
				</view>
			</view>
			<view v-show="istra">
				<view class="cartType_item">
					<view>
						<em style="display: inline-block ;color: #f00;">*</em>
						原仓库：
						<view style="color: #9E2424FF;display: inline-block;vertical-align:middle;">
							{{outhouse}}
						</view>
					</view>
				</view>
				<view class="cartType_item">
					<view>
						<em style="display: inline-block ;color: #f00;">*</em>
						转库仓库：
						<view style="color: #9E2424FF;display: inline-block;vertical-align:middle;">
							{{transferhouse}}
						</view>
					</view>
				</view>
			</view>
			<view class="cartType_item">
				<view>
					<em style="display: inline-block ;color: #f00;">*</em>
					备注：
					<view style="color: #9E2424FF;display: inline-block;vertical-align:middle;">
						{{comment}}
					</view>
				</view>
			</view>
			<view>
				<view style="padding: 0 32.04rpx 20rpx 32.04rpx">货品名称：</view>
				<scroll-view scroll-y class="content_scroll">
					<yt-card head=" " v-for="(item,index) in cart_names" :key="index">
						<view class="content">
							<view class="content_img_box">
								<image class="content_img" src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-baf89db3-4d55-4b1f-a05e-c0a1170f8dce/981a7502-fefb-4ff6-bec6-7513cd717fa7.jpg"></image>
							</view>
							<view class="content_text">
								<view class="content_text_cartName">
									商品名称：<text style="color: #9E2424FF;">{{item.cartName}}</text>
								</view>
								<view class="content_text_type">
									<view class="type_1">
										灶具进风：<text style="color: #9E2424FF;margin-right: 20rpx;">{{item.jf}}</text>
										气源类别：<text style="color: #9E2424FF;">{{item.lb}}</text>
									</view>
									<view class="type_2">
										灶具出风：<text style="color: #9E2424FF;margin-right: 20rpx;">{{item.cf}}</text>
										灶眼数量：<text style="color: #9E2424FF;">{{item.zysl}}</text>
									</view>
								</view>
							</view>
						</view>
					</yt-card>
				</scroll-view>
			</view>
			<view class="subimt_ruku" @click="backup">
				<yt-botton btname="返回"></yt-botton>
			</view>
		</view>
	</view>
</template>

<script>
	import ytBotton from '../../comment/yt-botton.vue'
	import ytCard from '../../comment/yt-card.vue'
	export default {
		data() {
			return {
				applicant:'',
				user_name:'',
				user_phone:'',
				user_local:'',
				cart_names:[],
				istra:'',
				outhouse:'',
				transferhouse:'',
				comment:''
			};
		},
		onLoad(option) {
			this.applicant = decodeURIComponent(option.applicant) 
			this.user_name = decodeURIComponent(option.client) 
			this.user_phone = decodeURIComponent(option.client_phone) 
			this.user_local = decodeURIComponent(option.client_local) 
			this.cart_names = JSON.parse(decodeURIComponent(option.cart_names))
			if(decodeURIComponent(option.istra) == 'true'){
				this.istra = true
			}else{
				this.istra = false
			}
			this.outhouse = decodeURIComponent(option.outhouse)
			this.transferhouse = decodeURIComponent(option.transferhouse)
			this.comment = decodeURIComponent(option.comment)
		},
		methods:{
			backup(){
				uni.navigateBack()
			}
		},
		components:{
			ytBotton,
			ytCard
		}
	}
</script>

<style lang="scss">
.recordDetails{
	position: absolute;
	width: 100%;
	min-height: 1480rpx;
	background-color: #EEEEEEFF;
	.cartType{
		.cartType_item{
			padding: 26.7rpx 32.04rpx;
			background-color: #FFFFFF;
			margin:21.36rpx 0;
			font-size: 30rpx;
		}
	}
	.subimt_ruku{
		margin-top: 77.43rpx;
	}
	.content_scroll{
		display: block;
		height: 30vh;
	}
	.content{
		display: inline-flex;
		.content_img_box{
			.content_img{
				border: 2.67rpx solid #7070703D;
				border-radius: 40.05rpx;
				width: 150rpx;
				height: 150rpx;
				margin-right: 20rpx;
			}
		}
		.content_text{
			font-size: 20rpx;
			.content_text_cartName{
				margin-bottom: 25rpx;
			}
			.content_text_type{
				
				.type_1{
					margin-bottom: 25rpx;
				}
				.type_2{
					margin-bottom: 25rpx;
				}
			}
		}
	}
}
</style>
